<!-- 根据机构是否支持来显示 -->
<ng-container *ngIf="isSupportRisk">
  <div class="cil__detail-rest-info--label" translate-origin="事中风控方案详情">
    <span>{{'RISK_CTRL.TITLE.PROCESS_RC_DETAIL' | i18n}}</span>
  </div>
  <div class="cil__bottom-columns-block">
    <app-info-row
      *ngFor="let column of columns[fields.RiskControl]; let rowIndex = index"
      [ifEdit]="isEdits[fields.RiskControl][rowIndex]"
      [columns]="column"
      (active)="activeItem($event, rowIndex)"
      [rowIndex]="rowIndex">
    </app-info-row>
  </div>
</ng-container>

<ng-template #tpRCSelect>
  <app-risk-control-select [(ngModel)]="riskScheme"></app-risk-control-select>
</ng-template>

<ng-template #operate let-rowIndex="rowIndex">
  <app-rest-edit
    [editing]="isEdits[fields.RiskControl][rowIndex]"
    (edit)="edit(fields.RiskControl, rowIndex)"
    (cancel)="cancel()"
    (submit)="submit()">
  </app-rest-edit>
</ng-template>

<!-- 根据机构是否支持来显示 -->
<ng-container *ngIf="isSupportPostRisk">
  <div class="cil__detail-rest-info--label" translate-origin="事后风控方案详情">
    <span>{{'RISK_CTRL.TITLE.POST_RC_DETAIL' | i18n}}</span>
  </div>
  <div class="cil__bottom-columns-block">
    <app-info-row
      *ngFor="let column of columns[fields.PostRiskControl]; let rowIndex = index"
      [ifEdit]="isEdits[fields.PostRiskControl][rowIndex]"
      [columns]="column"
      (active)="activeItem($event, rowIndex)"
      [rowIndex]="rowIndex">
    </app-info-row>
  </div>

</ng-container>

<ng-template #tpPostRCSelect>
  <app-risk-control-select [(ngModel)]="postRiskScheme"  (ngModelChange)="changPostRisk(postRiskScheme)" [isPostpositive]="true" [insCode]="insCode"></app-risk-control-select>
</ng-template>

<ng-template #operateOfPostRC let-rowIndex="rowIndex">
  <app-rest-edit
    [editing]="isEdits[fields.PostRiskControl][rowIndex]"
    (edit)="edit(fields.PostRiskControl, rowIndex)"
    (cancel)="cancel()"
    (submit)="submit()">
  </app-rest-edit>
</ng-template>